//
//  XZLeaveInfoImgCell.m
//  Teecloud
//
//  Created by PC on 2018/11/7.
//  Copyright © 2018年 小志. All rights reserved.
//

#import "XZLeaveInfoImgCell.h"
#import "XZImgFileList.h"
@interface XZLeaveInfoImgCell ()

@property (weak, nonatomic) IBOutlet UIView *imgView;

@end
@implementation XZLeaveInfoImgCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
//初始化创建图片
- (void)setImgArray:(NSArray *)imgArray{
    _imgArray = imgArray;
    //问题 图片的起始位置 图片的间距
    CGFloat askPhotoX =0;
    CGFloat askPhotoPadding =8;
        for(int i =0; i <imgArray.count; i++){
            UIImageView *img = [[UIImageView alloc]init];
            //设置按钮的位置
            img.frame=CGRectMake(askPhotoX, 0, 60, 60);
            askPhotoX += 60 + askPhotoPadding;
            XZImgFileList *imgModel =imgArray[i];
            [img yy_setImageWithURL:[NSURL URLWithString:imgModel.Url] placeholder:DefealtImg];
            [self.imgView addSubview:img];
        }
}

@end
